import { Driver } from './driver';
import { Parameter } from '../../../common';
import { SimulationSpec } from '../simulation/type';

export type Drivers = { [driverName: string] : Driver };

export interface EnvironmentVariable {
  name: string,
  value: string
}

export type DriverConfig = {
  product: string,
  version: string,
  canConcurrent: boolean,
  maxConcurrent: number,
  executable: string, // ".\\axisuiteDriver.exe",
  description: string
}

export type DriverLaunchParameter = SimulationSpec & {
  driverName?: string
}

export interface OutputParameter extends Parameter {
  type: string
}

export type DriverResultData = {
  simulationResultDir?: string,
  specifiedParameters?: OutputParameter[]
}

export type DriverResult = {
  success: boolean,
  data: DriverResultData,
  message: string
}

export type DriverRunOptions = {
  driverName: string;
  configFilePath: string;
  outputFilePath: string;
  logger?: any;
  driverConfigPath?: string;
}

export type DriverParseOptions = {
  driverName: string,
  modelDir: string,
  outputFilePath: string,
  modelEntry?: string,
  logger?: any
}